package com.bjfu.gmms.service;

import com.bjfu.gmms.MyBatisUtil;
import com.bjfu.gmms.mapper.StudentExamViewMapper;
import com.bjfu.gmms.model.StudentExamView;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class StudentExamViewService {
    public List<StudentExamView> getStudentExamInfo(int studentId) {

        try (SqlSession session = MyBatisUtil.getSqlSession("development")) {// 使用 MyBatisUtil 获取 SqlSession
            StudentExamViewMapper mapper = session.getMapper(StudentExamViewMapper.class);

            return mapper.getStudentExamInfo(studentId);
        }
    }
}
